#pragma once

#define OP_MOV_TO_MEM_SEG_ES 0x26
#define OP_MOV_TO_MEM_SEG_CS 0x2e
#define OP_MOV_TO_MEM_SEG_SS 0x36
#define OP_MOV_TO_MEM_SEG_DS 0x3e
#define OP_MOV_BYTE_IMM_TO_MEM_SEG_DS 0xc6
#define OP_MOV_WORD_IMM_TO_MEM_SEG_DS 0xc7

#define OP_INC_AX 0x40
#define OP_INC_CX 0x41
#define OP_INC_DX 0x42
#define OP_INC_BX 0x43
#define OP_INC_SP 0x44
#define OP_INC_BP 0x45
#define OP_INC_SI 0x46
#define OP_INC_DI 0x47
#define OP_DEC_AX 0x48
#define OP_DEC_CX 0x49
#define OP_DEC_DX 0x4a
#define OP_DEC_BX 0x4b
#define OP_DEC_SP 0x4c
#define OP_DEC_BP 0x4d
#define OP_DEC_SI 0x4e
#define OP_DEC_DI 0x4f

#define OP_PUSH_AX 0x50
#define OP_PUSH_CX 0x51
#define OP_PUSH_DX 0x52
#define OP_PUSH_BX 0x53
#define OP_PUSH_SP 0x54
#define OP_PUSH_BP 0x55
#define OP_PUSH_SI 0x56
#define OP_PUSH_DI 0x57
#define OP_POP_AX 0x58
#define OP_POP_CX 0x59
#define OP_POP_DX 0x5a
#define OP_POP_BX 0x5b
#define OP_POP_SP 0x5c
#define OP_POP_BP 0x5d
#define OP_POP_SI 0x5e
#define OP_POP_DI 0x5f

#define OP_PUSHAW 0x60
#define OP_POPAW 0x61
#define OP_PUSH_WR_IMM 0x68
#define OP_PUSH_BT_IMM 0x6A

#define OP_JO 0x70
#define OP_JNO 0x71
#define OP_JC 0x72
#define OP_JNC 0x73
#define OP_JZ 0x74
#define OP_JNZ 0x75
#define OP_JNA 0x76
#define OP_JA 0x77
#define OP_JS 0x78
#define OP_JNS 0x79
#define OP_JPE 0x7a
#define OP_JPO 0x7b
#define OP_JL 0x7c
#define OP_JNL 0x7d
#define OP_JNG 0x7e
#define OP_JG 0x7f

#define OP_MOV_BT_REG_TO_REG 0x88
#define OP_ALTO 0xc0
#define OP_CLTO 0xc8
#define OP_DLTO 0xd0
#define OP_BLTO 0xd8
#define OP_AHTO 0xe0
#define OP_CHTO 0xe8
#define OP_DHTO 0xf0
#define OP_BHTO 0xf8

#define OP_MOV_WR_REG_TO_REG 0x89
#define OP_AXTO 0xc0
#define OP_CXTO 0xc8
#define OP_DXTO 0xd0
#define OP_BXTO 0xd8
#define OP_SPTO 0xe0
#define OP_BPTO 0xe8
#define OP_SITO 0xf0
#define OP_DITO 0xf8

#define OP_MOV_SEG_TO_REG 0x8c
#define OP_MOV_REG_TO_SEG 0x8e
#define OP_ES 0xc0
#define OP_CS 0xc8
#define OP_SS 0xd0
#define OP_DS 0xd8

#define OP_NOP 0x90

#define OP_CBW 0x98
#define OP_CWD 0x99
#define OP_PUSHFW 0x9c
#define OP_POPFW 0x9d
#define OP_SAHF 0x9e
#define OP_LAHF 0x9f

#define OP_MOV_BT_IMM_TO_AL 0xb0
#define OP_MOV_BT_IMM_TO_CL 0xb1
#define OP_MOV_BT_IMM_TO_DL 0xb2
#define OP_MOV_BT_IMM_TO_BL 0xb3
#define OP_MOV_BT_IMM_TO_AH 0xb4
#define OP_MOV_BT_IMM_TO_CH 0xb5
#define OP_MOV_BT_IMM_TO_DH 0xb6
#define OP_MOV_BT_IMM_TO_BH 0xb7

#define OP_MOV_WR_IMM_TO_AX 0xb8
#define OP_MOV_WR_IMM_TO_CX 0xb9
#define OP_MOV_WR_IMM_TO_DX 0xba
#define OP_MOV_WR_IMM_TO_BX 0xbb
#define OP_MOV_WR_IMM_TO_SP 0xbc
#define OP_MOV_WR_IMM_TO_BP 0xbd
#define OP_MOV_WR_IMM_TO_SI 0xbe
#define OP_MOV_WR_IMM_TO_DI 0xbf

#define OP_RET 0xc3
#define OP_LEAVE 0xc9
#define OP_RETF 0xcb
#define OP_INT3 0xcc
#define OP_INT 0xcd
#define OP_IRET 0xcf

#define OP_LODSB 0xac
#define OP_LODSW 0xad

#define OP_IN_ALIMM 0xe4
#define OP_IN_AXIMM 0xe5
#define OP_OUT_IMMAL 0xe6
#define OP_OUT_IMMAX 0xe7
#define OP_CALL_NEAR_IMM 0xe8
#define OP_IN_ALDX 0xec
#define OP_IN_AXDX 0xed
#define OP_OUT_DXAL 0xee
#define OP_OUT_DXAX 0xef

#define OP_REP 0xf3
#define OP_HLT 0xf4
#define OP_CMC 0xf5
#define OP_CLC 0xf8
#define OP_STC 0xf9
#define OP_CLI 0xfa
#define OP_STI 0xfb
#define OP_CLD 0xfc
#define OP_STD 0xfd
#define OP_INCDEC_BT_REG 0xfe
#define OP_CALL_NEAR_INDIRECT 0xff